@extends('layouts.app')

@section('title','editTrainOrder')

@section('content')
<div class="container">
        <div class="row">
            <header class="list-header">
                    <a href="{{route('trainOrder.index')}}"><i class="fa fa-arrow-circle-left fa-lg" aria-hidden="true"></i>返回</a>
            </header>
            {!! Form::model($trainOrder, ['action' => ['TrainOrderController@update',$trainOrder->id], 'files' => true]) !!}
            <input name="_method" type="hidden" value="PATCH">
            {{ csrf_field() }}
            <div class="form-group{{ $errors->has('username')?'has-error':'' }}">
                        {!! Form::label('username','用户名称:')!!}
                        {!! Form::text('username',null,['class'=>'form-control'])!!}
                        @if ($errors->has('username'))
                            <span class="help-block">
                                <strong>{{ $errors->first('username') }}</strong>
                            </span>
                        @endif
                    </div>
                    <div class="form-group{{ $errors->has('phone')?'has-error':'' }}">
                        {!! Form::label('phone','用户电话') !!}
                        {!! Form::text('phone',null,['class'=>'form-control']) !!}
                        @if ($errors->has('phone'))
                            <span class="help-block">
                                <strong>{{ $errors->first('phone') }}</strong>
                            </span>
                        @endif
                    </div>
                 <div class="form-group{{ $errors->has('professional')?'has-error':'' }}">
                        {!! Form::label('professional','用户职业:')!!}
                        {!! Form::text('professional',null,['class'=>'form-control'])!!}
                        @if ($errors->has('professional'))
                            <span class="help-block">
                                <strong>{{ $errors->first('professional') }}</strong>
                            </span>
                        @endif
                    </div>
                    <div class="form-group{{ $errors->has('counts')?'has-error':'' }}">
                        {!! Form::label('counts','购买数量:') !!}
                        {!! Form::number('counts',null,['class'=>'form-control']) !!}
                        @if ($errors->has('counts'))
                            <span class="help-block">
                                <strong>{{ $errors->first('counts') }}</strong>
                            </span>
                        @endif
                    </div>
                    {!! Form::submit('更新活动信息',['class'=>"btn btn-success"]); !!}
                    {!! Form::close() !!}            
                </div>
                <div id="debug"></div>
        </div>
    </div>
@endsection
